-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(codegen): preprocessModel -> map waiter errorType to shapeId if awsQueryError.code #6483
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kuhe
requested changes
Sep 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will review collaboratively.
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
...egen/src/main/java/software/amazon/smithy/aws/typescript/codegen/ProcessAwsQueryWaiters.java
Outdated
Show resolved
Hide resolved
…role_arn in credential_source (aws#6472) * fix(credential-provider-ini): fix recursive assume role and optional role_arn in credential_source * test(credential-provider-ini): fix mock call verification * test(credential-provider-node): add test case with chained web id token file
…setting for Next.js 14 SSG only applications
…release of Connector for SCEP, a feature of AWS Private CA. Connector for SCEP links your SCEP-enabled and mobile device management systems to AWS Private CA for digital signature installation and certificate management.
…t fixes several customer-reported issues
…T Device Management Software Package Catalog and Jobs. It also adds SBOM support in Software Package Version.
…PC support to ModelInvocation jobs. To use a cross account bucket, pass in the accountId of the bucket to s3BucketOwner in the ModelInvocationJobInputDataConfig or ModelInvocationJobOutputDataConfig.
…ss-Region organizational units in Automation. Various documentation updates.
…sted GitLab runners in CodeBuild. Add group webhooks
… information about the BYOL model for RDS for Db2.
…ailable`, `exploitAvailable`, and `fixedInVersion` fields to provide more detailed information about the availability of fixes, exploits, and fixed versions for identified image vulnerabilities.
* chore(clients): codegen sync for IDE type navigation * chore: codegen update * chore: update smithy dependencies
…rchaseRecommendation API to support recommendations for Amazon DynamoDB reservations.
…ardDuty findings.
…pgrading snapshots with unsupported engine versions for RDS for MySQL and RDS for PostgreSQL.
…g, and describing access to the AWS Directory Service Data API
…Data API, enabling you to manage data stored in AWS Directory Service directories. This includes APIs for creating, reading, updating, and deleting directory users, groups, and group memberships.
…n, where customers can set up a StringExpression with a MimeHeader condition. This condition will perform the necessary validation based on the X-header provided by customers.
…SageMaker Studio for JupyterLab and CodeEditor applications.
…esource. 2. Commit mode adds visibility configuration of Apply button on multi-select controls for authors.
… and code signing configuration resources.
…al DRM configurations per SPEKE Version 2.0.
… and HEVC encodes, multiplex container settings.
…t field to CreateSyncConfiguration API input, UpdateSyncConfiguration API input, GetSyncConfiguration API output and ListSyncConfiguration API output
…ministrators to view and manage end-user browsing sessions via Session Management APIs.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my most up-to-date attempt at fixing the awsQuery waiter error matcher issue.
In my code, I do 3 things:
Create a key-value store of awsQueryError codes to their corresponding error shape IDs. For example:
"LoadBalancerNotFound": "com.amazonaws.elasticloadbalancingv2#LoadBalancerNotFoundException"
.This mapping is used to swap the error matcher.
Traverse down the waiter shapes in the model, moving through the acceptor array → matcher → error type. Once there, I perform the swap in the error matcher to use the correct shape ID.
Track modifications for efficiency to ensure only modified shapes are processed and replaced in the model.
Output:
When I print my changes, I get something promising:
Issue
When I regenerate the client I see a build error:
I also tried changing the mapping from the full shape ID (e.g., "com.amazonaws.elasticloadbalancingv2#LoadBalancerNotFoundException") to just the shape name (e.g., "LoadBalancerNotFoundException"). but that didn't solve the issue.
I suspect I might not be using DynamicTrait correctly.